package org.pangu.controller;

import org.pangu.api.ProductService;
import org.pangu.common.Result;
import org.pangu.dto.ProductDTO;
import org.pangu.vo.ProductVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProductController {

	@Autowired
	private ProductService productService;
	
	@GetMapping("/api/findProduct")
	public Result<ProductVO> findProduct(@RequestBody ProductDTO dto) {
		Result<ProductVO> target = productService.findProduct(dto);
		return target;
	}
}
